using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class t_Base_ModuleChartMap : EntityTypeConfiguration<t_Base_ModuleChart>
    {
        public t_Base_ModuleChartMap()
        {
            // Primary Key
            this.HasKey(t => t.FChartID);

            // Properties
            this.Property(t => t.FName)
                .IsRequired()
                .HasMaxLength(255);

            this.Property(t => t.FCode)
                .HasMaxLength(100);

            this.Property(t => t.FChartContent)
                .IsRequired();

            this.Property(t => t.FDescription)
                .HasMaxLength(255);

            this.Property(t => t.FSysLanguage)
                .IsRequired()
                .HasMaxLength(16);

            // Table & Column Mappings
            this.ToTable("t_Base_ModuleChart");
            this.Property(t => t.FID).HasColumnName("FID");
            this.Property(t => t.FChartID).HasColumnName("FChartID");
            this.Property(t => t.FMenuID).HasColumnName("FMenuID");
            this.Property(t => t.FName).HasColumnName("FName");
            this.Property(t => t.FCode).HasColumnName("FCode");
            this.Property(t => t.FChartContent).HasColumnName("FChartContent");
            this.Property(t => t.FModuleCategory).HasColumnName("FModuleCategory");
            this.Property(t => t.FStatus).HasColumnName("FStatus");
            this.Property(t => t.FChartType).HasColumnName("FChartType");
            this.Property(t => t.FDescription).HasColumnName("FDescription");
            this.Property(t => t.FCreatorID).HasColumnName("FCreatorID");
            this.Property(t => t.FCreateTime).HasColumnName("FCreateTime");
            this.Property(t => t.FUserID).HasColumnName("FUserID");
            this.Property(t => t.FSystem).HasColumnName("FSystem");
            this.Property(t => t.FGUIMenuID).HasColumnName("FGUIMenuID");
            this.Property(t => t.FSysLanguage).HasColumnName("FSysLanguage");
        }
    }
}
